package main

import (
	"ezcloud/gw/internal/conf"
	"ezcloud/gw/internal/log"
	"ezcloud/gw/pkg/listen"
)

func main() {
	listenConf := conf.ListenerConfig{
		Type: "tcp",
		Host: "",
		Port: 8080,
		Protocol: conf.ProtocolConfig{
			Type:     "http",
			Ssl:      true,
			CertFile: "conf/server.crt",
			KeyFile:  "conf/server.key",
		},
	}
	l := listen.NewListener(listenConf)
	err := l.Start()
	if err != nil {
		log.Errorf("error := %v.\n", err)
	}
}
